package com.kimoge.spring6.validation.methodthree;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author kimoge
 * @date 2025/8/30
 * @description
 */
public class TestDemo {
    @Test
    public void test() {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(ValidatorConfig.class);
        MyService bean = context.getBean(MyService.class);
        User user = new User();
        user.setName("李四");
        user.setPhone("13456789000");
        System.out.println(bean.testParams(user));
    }
}
